PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


HitTestThemeTrack

Returns whether the user clicked upon the specified track.

pascal Boolean HitTestThemeTrack (
                     const ThemeTrackDrawInfo *drawInfo,
                     Point mousePoint,
                     ControlPartCode *partHit);
drawInfo
A pointer to a structure of type ThemeTrackDrawInfo . Before calling HitTestThemeTrack , set the structure to contain the current visual characteristics of the track.
mousePoint
A structure of type Point . Pass the point, specified in local coordinates, where the mouse-down event occurred. Your application may retrieve this value from the where field of the event structure.
partHit
A pointer to a value of type ControlPartCode . On return, this value specifies the part of the track in which the mouse-down event occurred.
function result
A value of type Boolean . If true , the mouse-down event occurred inside the track; otherwise, false .
DISCUSSION

The HitTestThemeTrack function checks to see whether a given track contains the specified point at which a mouse-down event occurred.

For a scroll bar-type track, your application should also check to see whether the mouse-down event occurred in the scroll bar's arrows, which are not considered part of the track and are not tested by this function. To do this, your application should first use the function HitTestThemeScrollBarArrows to test whether a given mouse-down event occurred on a scroll bar's arrows. If not, you may then use the rectangle produced in the rTrack parameter of HitTestThemeScrollBarArrows as the bounds of the track for HitTestThemeTrack , in order to determine whether the mouse-down event occurred in the track part of the scroll bar.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)